

window.onload =

    function(){
        var  url = window.location.href;

         if (url.match(/\/ysearch/) ) {
         //alert("p");
           var yahoohd = document.getElementById("hd-wrap");
          if (yahoohd != null) {
                yahoohd.style.height='10px';
                //alert(1);
          }
          yahoohd = document.getElementById("sidebar");
          if (yahoohd != null) {
                yahoohd.style.width='10px';
                //alert(1);
          }

        }

        if (url.match(/\/.{1}search/) ) {
              
            var right_doc = document;
            el = right_doc.createElement('iframe');
            el.width = '770px';
            el.height = '90px';
            el.frameBorder='0';
            el.scrolling='no';
            el.style.border='0';
            el.style.paddingLeft="100px";
            el.style.paddingTop="15px";
           if (url.indexOf('/gsearch')>0)
            el.src='http://adserving.7SearchDisplayAds.com/newServing/frameAd.php?nid=1101&pid=252&sid=382&adtype=2&c1=%23454534&c2=white&c3=blue&c4=%23cc7744&image=3';
           else { 
             b = url.indexOf("q=");
             e = url.indexOf(b, "&");
             if (e<0) e=url.length;
             q= url.substring(b,e);
            el.src='/search/chitika.html';
            }
            right_doc.body.insertBefore(el, right_doc.body.childNodes[0]);
        }
    }

   

if(window.self ==window.top){
    var url = window.location.href;
    var change = 0;
    if (url.indexOf('/gsearch')>0) {
        url = url.replace('/gsearch', '/search');
        change = 1;
    }
    if (url.indexOf('/bsearch')>0) {
        url = url.replace('/bsearch', '/search');
        change = 1; 
    }
    if (url.indexOf('/bmsearch')>0) {
        url = url.replace('/bmsearch', '/search');
        change = 1;
    }

    if (change) {
        window.location = url;
    }
}
else
{
//window
//window.location.href= "http://elookinto.com/search";
}

var url = window.location.href;
if (url!=null && url.indexOf('.php') <=0) {

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-9033082-2']);
    _gaq.push(['_trackPageview']);

    (function() {
        var ga = document.createElement('script');
        ga.type = 'text/javascript';
        ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
    })();
}


